<%--
  Created by IntelliJ IDEA.
  User: dw.liu
  Date: 2015/8/21 0021
  Time: 14:37
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"/>
<html>
<head>
    <title>已部署流程定义列表--chapter5</title>
</head>
<body>
<fieldset id="deployFieldset">
    <legend>部署流程资源</legend>
    <span><b>支持文件格式：</b>zip、bar、bpmn、bpmn20.xml</span>

    <form action="${ctx }/deployment/deploy" method="post" enctype="multipart/form-data" style="margin-top:1em;">
        <input type="file" name="file"/>
        <input type="submit" value="Submit" />
    </form>
    <hr class="soften"/>
</fieldset>
<table width="100%">
    <thead>
    <tr>
        <th>流程定义ID</th>
        <th>部署ID</th>
        <th>流程定义名称</th>
        <th>流程定义KEY</th>
        <th>版本号</th>
        <th>XML资源名称</th>
        <th>图片资源名称</th>
        <th width="80">操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${processDefinitionList }" var="pd">
        <tr>
            <td>${pd.id }</td>
            <td>${pd.deploymentId }</td>
            <td>${pd.name }</td>
            <td>${pd.key }</td>
            <td>${pd.version }</td>
            <td><a target="_blank"
                   href='${ctx }/deployment/readResource?pdid=${pd.id }&resourceName=${pd.resourceName }'>${pd.resourceName }</a>
            </td>
            <td><a target="_blank"
                   href='${ctx }/deployment/readResource?pdid=${pd.id }&resourceName=${pd.diagramResourceName }'>${pd.diagramResourceName }</a>
            </td>
            <td><a target="_blank" href='${ctx }/deployment/delete?deploymentId=${pd.deploymentId }'>删除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>
</body>
</html>
